﻿using System;
using TI_BLE_HCI_ClientLib.BaseEntities;
using TI_BLE_HCI_ClientLib.GenericHCIEntities;
using TI_BLE_HCI_ClientLib.HCIBaseEntities;

namespace TI_BLE_HCI_ClientLib.HCICommands
{
    public class HCICommand_GATT_Read_Characteristic_Value_Request : HCIVendorSpecificCommand
    {
        private const byte CMD = 0x0A;

        public static byte CommandOpCode
        {
            get { return CMD; }
        }

        public HCICommand_GATT_Read_Characteristic_Value_Request(ushort connHandle, ushort charHandle)
            : base(HCIVendorSpecificCommandCSG.GATT,CMD)
        {
            var pars = new BaseEntityParameter[2];

            pars[0] = new WordParameter(connHandle);
            pars[1] = new WordParameter(charHandle);
            
            base.addParameters(pars);
        }
    }
}
